summaryrefslogtreecommitdiffstats
path: root/.github/workflows/android-ea-play-release.yml
blob: 0cf78279c21f6c3dbe71070ef89182248f0c519c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later

name: yuzu-android-ea-play-release

on:
  workflow_dispatch:
    inputs:
      release-track:
        description: 'Play store release track (internal/alpha/beta/production)'
        required: true
        default: 'alpha'

jobs:
  android:
    runs-on: ubuntu-latest
    if: ${{ github.repository == 'yuzu-emu/yuzu' }}
    steps:
      - uses: actions/checkout@v3
        name: Checkout
        with:
          fetch-depth: 0
          submodules: true
          token: ${{ secrets.ALT_GITHUB_TOKEN }}
      - run: npm install execa@5
      - uses: actions/github-script@v5
        name: 'Merge and publish Android EA changes'
        env:
          ALT_GITHUB_TOKEN: ${{ secrets.ALT_GITHUB_TOKEN }}
          BUILD_EA: true
        with:
          script: |
            const execa = require("execa");
            const mergebot = require('./.github/workflows/android-merge.js').mergebot;
            process.chdir('${{ github.workspace }}');
            mergebot(github, context, execa);
      - name: Get tag name
        run: echo "GIT_TAG_NAME=$(cat tag-name.txt)" >> $GITHUB_ENV
      - name: Set up JDK 17
        uses: actions/setup-java@v3
        with:
          java-version: '17'
          distribution: 'temurin'
      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
      - name: Build
        run: ./.ci/scripts/android/eabuild.sh
        env:
          EA_PLAY_ANDROID_KEYSTORE_B64: ${{ secrets.PLAY_ANDROID_KEYSTORE_B64 }}
          PLAY_ANDROID_KEY_ALIAS: ${{ secrets.PLAY_ANDROID_KEY_ALIAS }}
          PLAY_ANDROID_KEYSTORE_PASS: ${{ secrets.PLAY_ANDROID_KEYSTORE_PASS }}
          EA_SERVICE_ACCOUNT_KEY_B64: ${{ secrets.EA_SERVICE_ACCOUNT_KEY_B64 }}
          STORE_TRACK: ${{ github.event.inputs.release-track }}
          AUTO_VERSIONED: true
          BUILD_EA: true
      - name: Create release
        uses: softprops/action-gh-release@v1
        with:
          tag_name: ${{ env.EA_TAG_NAME }}
          name: ${{ env.EA_TAG_NAME }}
          draft: false
          prerelease: false
          repository: yuzu/yuzu-android
          token: ${{ secrets.ALT_GITHUB_TOKEN }}